package com.zc.trendsDispatch.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.xml.crypto.Data;
import java.math.BigDecimal;
import java.util.Date;


/**
 * 充电过程中实时数据 + 交易订单信息对象 charge_pile_order_info
 *
 * @author gaojikun
 * @date 2024-02-19
 */
public class ChargePileOrderInfo extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    private Long id;

    /**
     * 交易流水号
     */
    @Excel(name = "交易流水号")
    private String orderCode;

    /**
     * 订单编号
     */
    @Excel(name = "订单编号")
    private String transactionNum;

    /**
     * 输出电压
     */
    @Excel(name = "输出电压")
    private String outVoltage;

    /**
     * 输出电流
     */
    @Excel(name = "输出电流")
    private String outCurrent;

    /**
     * 充电功率
     */
    @Excel(name = "充电功率")
    private String power;

    /**
     * 当前SOC
     */
    @Excel(name = "当前SOC")
    private String soc;

    /**
     * 累计充电时间（min）
     */
    @Excel(name = "累计充电时间", readConverterExp = "m=in")
    private Long accumulateChargeTime;

    /**
     * 剩余充电时间（min）
     */
    @Excel(name = "剩余充电时间", readConverterExp = "m=in")
    private Long residueTime;

    /**
     * 充电度数（kwh）
     */
    @Excel(name = "充电度数", readConverterExp = "k=wh")
    private String chargeKwh;

    /**
     * 计损充电度数（kwh）
     */
    @Excel(name = "计损充电度数", readConverterExp = "k=wh")
    private String lossChargeKwh;

    /**
     * 已充金额
     */
    @Excel(name = "已充金额")
    private BigDecimal chargeMoney;

    /**
     * 充电桩编号
     */
    @Excel(name = "充电桩编号")
    private String pileNumber;

    /**
     * 充电枪编号
     */
    @Excel(name = "充电枪编号")
    private String gunNumber;

    /**
     * 充电开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "充电开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 充电结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "充电结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /**
     * 尖单价(精确到小数点后五位（尖电费+尖服务费，见费率帧）)
     */
    @Excel(name = "尖单价(精确到小数点后五位", readConverterExp = "尖=电费+尖服务费，见费率帧")
    private String pointedUnitPrice;

    /**
     * 尖电量(精确到小数点后四位)
     */
    @Excel(name = "尖电量(精确到小数点后四位)")
    private String pointedKwh;

    /**
     * 损尖电量(精确到小数点后四位)
     */
    @Excel(name = "损尖电量(精确到小数点后四位)")
    private String pointedLossKwh;

    /**
     * 尖金额(精确到小数点后四位)
     */
    @Excel(name = "尖金额(精确到小数点后四位)")
    private String pointedMoney;

    /**
     * 峰单价(精确到小数点后五位（峰电费+峰服务费，见费率帧）)
     */
    @Excel(name = "峰单价(精确到小数点后五位", readConverterExp = "峰=电费+峰服务费，见费率帧")
    private String peakUnitPrice;

    /**
     * 峰电量(精确到小数点后四位)
     */
    @Excel(name = "峰电量(精确到小数点后四位)")
    private String peakKwh;

    /**
     * 损峰电量(精确到小数点后四位)
     */
    @Excel(name = "损峰电量(精确到小数点后四位)")
    private String peakLossKwh;

    /**
     * 峰金额(精确到小数点后四位)
     */
    @Excel(name = "峰金额(精确到小数点后四位)")
    private String peakMoney;

    /**
     * 平单价(精确到小数点后五位（平电费+平服务费，见费率帧）)
     */
    @Excel(name = "平单价(精确到小数点后五位", readConverterExp = "平=电费+平服务费，见费率帧")
    private String flatUnitPrice;

    /**
     * 平电量(精确到小数点后四位)
     */
    @Excel(name = "平电量(精确到小数点后四位)")
    private String flatKwh;

    /**
     * 损平电量(精确到小数点后四位)
     */
    @Excel(name = "损平电量(精确到小数点后四位)")
    private String flatLossKwh;

    /**
     * 平金额(精确到小数点后四位)
     */
    @Excel(name = "平金额(精确到小数点后四位)")
    private String flatMoney;

    /**
     * 谷单价(精确到小数点后五位（谷电费+谷服务费，见费率帧）)
     */
    @Excel(name = "谷单价(精确到小数点后五位", readConverterExp = "谷=电费+谷服务费，见费率帧")
    private String valleyUnitPrice;

    /**
     * 谷电量(精确到小数点后四位)
     */
    @Excel(name = "谷电量(精确到小数点后四位)")
    private String valleyKwh;

    /**
     * 损谷电量(精确到小数点后四位)
     */
    @Excel(name = "损谷电量(精确到小数点后四位)")
    private String valleyLossKwh;

    /**
     * 谷金额(精确到小数点后四位)
     */
    @Excel(name = "谷金额(精确到小数点后四位)")
    private String valleyMoney;

    /**
     * 电表总起值(精确到小数点后四位)
     */
    @Excel(name = "电表总起值(精确到小数点后四位)")
    private String electricityMeterStartPrice;

    /**
     * 电表总止值(精确到小数点后四位)
     */
    @Excel(name = "电表总止值(精确到小数点后四位)")
    private String electricityMeterStopPrice;

    /**
     * 总电量(精确到小数点后四位)
     */
    @Excel(name = "总电量(精确到小数点后四位)")
    private String assembleKwh;

    /**
     * 计损总电量(精确到小数点后四位)
     */
    @Excel(name = "计损总电量(精确到小数点后四位)")
    private String assembleLossKwh;

    /**
     * 消费金额(精确到小数点后四位，包含电费、服务费)
     */
    @Excel(name = "消费金额(精确到小数点后四位，包含电费、服务费)")
    private String assembleMoney;

    /**
     * 电动汽车唯一标识(VIN 码，此处 VIN 码和充电时 VIN码不同，正序直接上传，无需补 0和反序)
     */
    @Excel(name = "电动汽车唯一标识(VIN 码，此处 VIN 码和充电时 VIN码不同，正序直接上传，无需补 0和反序)")
    private String carVin;

    /**
     * 交易标识(0x01：app 启动0x02：卡启动0x04：离线卡启动0x05: vin 码启动充电)
     */
    @Excel(name = "交易标识(0x01：app 启动0x02：卡启动0x04：离线卡启动0x05: vin 码启动充电)")
    private String transactionIdentifier;

    /**
     * 交易日期、时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "交易日期、时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date transactionTime;

    /**
     * 停止原因
     */
    @Excel(name = "停止原因")
    private String stopReason;

    /**
     * 物理卡号(不足 8 位补 0)
     */
    @Excel(name = "物理卡号(不足 8 位补 0)")
    private String physicsCard;

    private String openId;

    //启动状态
    private String startState;

    //启动失败原因
    private String startFailureReason;

    //关闭状态
    private String stopState;

    //充电信息
    private String chargeInfo;

    public String getStartFailureReason() {
        return startFailureReason;
    }

    public void setStartFailureReason(String startFailureReason) {
        this.startFailureReason = startFailureReason;
    }

    public String getStartState() {
        return startState;
    }

    public void setStartState(String startState) {
        this.startState = startState;
    }

    public String getStopState() {
        return stopState;
    }

    public void setStopState(String stopState) {
        this.stopState = stopState;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setTransactionNum(String transactionNum) {
        this.transactionNum = transactionNum;
    }

    public String getTransactionNum() {
        return transactionNum;
    }

    public void setOutVoltage(String outVoltage) {
        this.outVoltage = outVoltage;
    }

    public String getOutVoltage() {
        return outVoltage;
    }

    public void setOutCurrent(String outCurrent) {
        this.outCurrent = outCurrent;
    }

    public String getOutCurrent() {
        return outCurrent;
    }

    public void setPower(String power) {
        this.power = power;
    }

    public String getPower() {
        return power;
    }

    public void setSoc(String soc) {
        this.soc = soc;
    }

    public String getSoc() {
        return soc;
    }

    public void setAccumulateChargeTime(Long accumulateChargeTime) {
        this.accumulateChargeTime = accumulateChargeTime;
    }

    public Long getAccumulateChargeTime() {
        return accumulateChargeTime;
    }

    public void setResidueTime(Long residueTime) {
        this.residueTime = residueTime;
    }

    public Long getResidueTime() {
        return residueTime;
    }

    public void setChargeKwh(String chargeKwh) {
        this.chargeKwh = chargeKwh;
    }

    public String getChargeKwh() {
        return chargeKwh;
    }

    public void setLossChargeKwh(String lossChargeKwh) {
        this.lossChargeKwh = lossChargeKwh;
    }

    public String getLossChargeKwh() {
        return lossChargeKwh;
    }

    public void setChargeMoney(BigDecimal chargeMoney) {
        this.chargeMoney = chargeMoney;
    }

    public BigDecimal getChargeMoney() {
        return chargeMoney;
    }

    public void setPileNumber(String pileNumber) {
        this.pileNumber = pileNumber;
    }

    public String getPileNumber() {
        return pileNumber;
    }

    public void setGunNumber(String gunNumber) {
        this.gunNumber = gunNumber;
    }

    public String getGunNumber() {
        return gunNumber;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setPointedUnitPrice(String pointedUnitPrice) {
        this.pointedUnitPrice = pointedUnitPrice;
    }

    public String getPointedUnitPrice() {
        return pointedUnitPrice;
    }

    public void setPointedKwh(String pointedKwh) {
        this.pointedKwh = pointedKwh;
    }

    public String getPointedKwh() {
        return pointedKwh;
    }

    public void setPointedLossKwh(String pointedLossKwh) {
        this.pointedLossKwh = pointedLossKwh;
    }

    public String getPointedLossKwh() {
        return pointedLossKwh;
    }

    public void setPointedMoney(String pointedMoney) {
        this.pointedMoney = pointedMoney;
    }

    public String getPointedMoney() {
        return pointedMoney;
    }

    public void setPeakUnitPrice(String peakUnitPrice) {
        this.peakUnitPrice = peakUnitPrice;
    }

    public String getPeakUnitPrice() {
        return peakUnitPrice;
    }

    public void setPeakKwh(String peakKwh) {
        this.peakKwh = peakKwh;
    }

    public String getPeakKwh() {
        return peakKwh;
    }

    public void setPeakLossKwh(String peakLossKwh) {
        this.peakLossKwh = peakLossKwh;
    }

    public String getPeakLossKwh() {
        return peakLossKwh;
    }

    public void setPeakMoney(String peakMoney) {
        this.peakMoney = peakMoney;
    }

    public String getPeakMoney() {
        return peakMoney;
    }

    public void setFlatUnitPrice(String flatUnitPrice) {
        this.flatUnitPrice = flatUnitPrice;
    }

    public String getFlatUnitPrice() {
        return flatUnitPrice;
    }

    public void setFlatKwh(String flatKwh) {
        this.flatKwh = flatKwh;
    }

    public String getFlatKwh() {
        return flatKwh;
    }

    public void setFlatLossKwh(String flatLossKwh) {
        this.flatLossKwh = flatLossKwh;
    }

    public String getFlatLossKwh() {
        return flatLossKwh;
    }

    public void setFlatMoney(String flatMoney) {
        this.flatMoney = flatMoney;
    }

    public String getFlatMoney() {
        return flatMoney;
    }

    public void setValleyUnitPrice(String valleyUnitPrice) {
        this.valleyUnitPrice = valleyUnitPrice;
    }

    public String getValleyUnitPrice() {
        return valleyUnitPrice;
    }

    public void setValleyKwh(String valleyKwh) {
        this.valleyKwh = valleyKwh;
    }

    public String getValleyKwh() {
        return valleyKwh;
    }

    public void setValleyLossKwh(String valleyLossKwh) {
        this.valleyLossKwh = valleyLossKwh;
    }

    public String getValleyLossKwh() {
        return valleyLossKwh;
    }

    public void setValleyMoney(String valleyMoney) {
        this.valleyMoney = valleyMoney;
    }

    public String getValleyMoney() {
        return valleyMoney;
    }

    public void setElectricityMeterStartPrice(String electricityMeterStartPrice) {
        this.electricityMeterStartPrice = electricityMeterStartPrice;
    }

    public String getElectricityMeterStartPrice() {
        return electricityMeterStartPrice;
    }

    public void setElectricityMeterStopPrice(String electricityMeterStopPrice) {
        this.electricityMeterStopPrice = electricityMeterStopPrice;
    }

    public String getElectricityMeterStopPrice() {
        return electricityMeterStopPrice;
    }

    public void setAssembleKwh(String assembleKwh) {
        this.assembleKwh = assembleKwh;
    }

    public String getAssembleKwh() {
        return assembleKwh;
    }

    public void setAssembleLossKwh(String assembleLossKwh) {
        this.assembleLossKwh = assembleLossKwh;
    }

    public String getAssembleLossKwh() {
        return assembleLossKwh;
    }

    public void setAssembleMoney(String assembleMoney) {
        this.assembleMoney = assembleMoney;
    }

    public String getAssembleMoney() {
        return assembleMoney;
    }

    public void setCarVin(String carVin) {
        this.carVin = carVin;
    }

    public String getCarVin() {
        return carVin;
    }

    public void setTransactionIdentifier(String transactionIdentifier) {
        this.transactionIdentifier = transactionIdentifier;
    }

    public String getTransactionIdentifier() {
        return transactionIdentifier;
    }

    public void setTransactionTime(Date transactionTime) {
        this.transactionTime = transactionTime;
    }

    public Date getTransactionTime() {
        return transactionTime;
    }

    public void setStopReason(String stopReason) {
        this.stopReason = stopReason;
    }

    public String getStopReason() {
        return stopReason;
    }

    public void setPhysicsCard(String physicsCard) {
        this.physicsCard = physicsCard;
    }

    public String getPhysicsCard() {
        return physicsCard;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getChargeInfo() {
        return chargeInfo;
    }

    public void setChargeInfo(String chargeInfo) {
        this.chargeInfo = chargeInfo;
    }

    public ChargePileOrderInfo() {

    }

    public ChargePileOrderInfo( String transactionNum, String startState) {
        this.transactionNum = transactionNum;
        this.startState = startState;
    }

    public ChargePileOrderInfo( String transactionNum, String startState, String stopState) {
        this.transactionNum = transactionNum;
        this.startState = startState;
        this.stopState = stopState;
    }

    public ChargePileOrderInfo(String transactionNum, String outVoltage, String outCurrent, String power,
                               String soc, Long accumulateChargeTime, Long residueTime,
                               String chargeKwh, String lossChargeKwh, BigDecimal chargeMoney) {
        this.transactionNum = transactionNum;
        this.outVoltage = outVoltage;
        this.outCurrent = outCurrent;
        this.power = power;
        this.soc = soc;
        this.accumulateChargeTime = accumulateChargeTime;
        this.residueTime = residueTime;
        this.chargeKwh = chargeKwh;
        this.lossChargeKwh = lossChargeKwh;
        this.chargeMoney = chargeMoney;
    }

    public ChargePileOrderInfo(String transactionNum, String pileNumber, String gunNumber, Date startTime, Date endTime,
                               String pointedUnitPrice, String pointedKwh, String pointedLossKwh,String pointedMoney, String peakUnitPrice,
                               String peakKwh, String peakLossKwh,String peakMoney, String flatUnitPrice, String flatKwh,
                               String flatLossKwh, String flatMoney,String valleyUnitPrice, String valleyKwh, String valleyLossKwh,
                               String valleyMoney,String electricityMeterStartPrice, String electricityMeterStopPrice, String assembleKwh,
                               String assembleLossKwh, String assembleMoney, String carVin,
                               String transactionIdentifier, Date transactionTime, String stopReason, String physicsCard) {
        this.transactionNum = transactionNum;
        this.pileNumber = pileNumber;
        this.gunNumber = gunNumber;
        this.startTime = startTime;
        this.endTime = endTime;
        this.pointedUnitPrice = pointedUnitPrice;
        this.pointedKwh = pointedKwh;
        this.pointedLossKwh = pointedLossKwh;
        this.pointedMoney = pointedMoney;
        this.peakUnitPrice = peakUnitPrice;
        this.peakKwh = peakKwh;
        this.peakLossKwh = peakLossKwh;
        this.peakMoney = peakMoney;
        this.flatUnitPrice = flatUnitPrice;
        this.flatKwh = flatKwh;
        this.flatLossKwh = flatLossKwh;
        this.flatMoney = flatMoney;
        this.valleyUnitPrice = valleyUnitPrice;
        this.valleyKwh = valleyKwh;
        this.valleyLossKwh = valleyLossKwh;
        this.electricityMeterStartPrice = electricityMeterStartPrice;
        this.electricityMeterStopPrice = electricityMeterStopPrice;
        this.assembleKwh = assembleKwh;
        this.valleyMoney = valleyMoney;
        this.assembleLossKwh = assembleLossKwh;
        this.assembleMoney = assembleMoney;
        this.carVin = carVin;
        this.transactionIdentifier = transactionIdentifier;
        this.transactionTime = transactionTime;
        this.stopReason = stopReason;
        this.physicsCard = physicsCard;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("transactionNum", getTransactionNum())
                .append("outVoltage", getOutVoltage())
                .append("outCurrent", getOutCurrent())
                .append("power", getPower())
                .append("soc", getSoc())
                .append("accumulateChargeTime", getAccumulateChargeTime())
                .append("residueTime", getResidueTime())
                .append("chargeKwh", getChargeKwh())
                .append("lossChargeKwh", getLossChargeKwh())
                .append("chargeMoney", getChargeMoney())
                .append("pileNumber", getPileNumber())
                .append("gunNumber", getGunNumber())
                .append("startTime", getStartTime())
                .append("endTime", getEndTime())
                .append("pointedUnitPrice", getPointedUnitPrice())
                .append("pointedKwh", getPointedKwh())
                .append("pointedLossKwh", getPointedLossKwh())
                .append("pointedMoney", getPointedMoney())
                .append("peakUnitPrice", getPeakUnitPrice())
                .append("peakKwh", getPeakKwh())
                .append("peakLossKwh", getPeakLossKwh())
                .append("peakMoney", getPeakMoney())
                .append("flatUnitPrice", getFlatUnitPrice())
                .append("flatKwh", getFlatKwh())
                .append("flatLossKwh", getFlatLossKwh())
                .append("flatMoney", getFlatMoney())
                .append("valleyUnitPrice", getValleyUnitPrice())
                .append("valleyKwh", getValleyKwh())
                .append("valleyLossKwh", getValleyLossKwh())
                .append("valleyMoney", getValleyMoney())
                .append("electricityMeterStartPrice", getElectricityMeterStartPrice())
                .append("electricityMeterStopPrice", getElectricityMeterStopPrice())
                .append("assembleKwh", getAssembleKwh())
                .append("assembleLossKwh", getAssembleLossKwh())
                .append("assembleMoney", getAssembleMoney())
                .append("carVin", getCarVin())
                .append("transactionIdentifier", getTransactionIdentifier())
                .append("transactionTime", getTransactionTime())
                .append("stopReason", getStopReason())
                .append("physicsCard", getPhysicsCard())
                .toString();
    }
}
